package com.learn.security.utils.message_digest;

import com.learn.security.utils.BaseUtil;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

/**
 * SHA加密工具类
 */
public class SHAUtil extends BaseUtil {

    public static final String KEY_SHA = "SHA";

    /**
     * SHA加密
     *
     * @param data 加密文件
     */
    public static byte[] encryptSHA(byte[] data) {
        return encryptSHAAndMd(data, KEY_SHA);
    }
}
